<?php
	include_once('./global.php');

		//print_r($_FILES['uploaded']);
		/*if(is_uploaded_file($_FILES['uploaded']['tmp_name'])){
			$uploaded = $_FILES["uploaded"];
			if($uploaded['error'] > 0){
				echo "<script>alert('上传出错，请重试')</script>";
			}else{
				if($uploaded["size"] <= '3145728'){
					$date = mktime();	
					$name = $_POST['uploaded_name'];
					$type = $_FILES['uploaded']['type'];
					$image_name = $name.$date;
					$path = "../images/";
					$file_pathname = "../images/".$name.".png";				
					if(move_uploaded_file($_FILES['uploaded']['tmp_name'],$file_pathname)){
						$sql_insert_pic = "INSERT INTO pictureinfo(`P_PID`, `P_Name`, `P_Path`, `P_Class`, `P_Adid`, `P_Adclass`, `P_Date`, `P_Url`) VALUES (NULL,'$name','$path','2',NULL,NULL,'$date',NULL)";
						$query_insert_pic = $mysqli->query($sql_insert_pic);
						if($query_insert_pic){
							echo "<script>alert('图片添加成功')</script>";
						}else{
							echo "<script>alert('图片添加失败')</script>";
						}
					}else{
						echo "失败";
					}				
				}else{
					echo "<script>alert('图片太大')</script>";
				}
			}
		}else{
			echo "<script>alert('请浏览你要上传的图片')</script>";
		}
	}*/
		$url = $_SERVER['REQUEST_URI'];
		$url_arr = parse_url($url);
		parse_str($url_arr['query'],$url_arr);
		$url_kw = $url_arr[kw];
		$url_order = $url_arr[order];
		echo $url_id;
		$where = "K_ID = '".$url_kw."'";
		$order = $url_order;
		$condition = new Condition($where,$order);
		$sql = "select * from keywordinfo {$condition->con()} ";
		echo $sql;

	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" id="html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>图片测试</title>
</head>
<body>
<a href="?id=11">123123</a>
<form action="" method="post" enctype="multipart/form-data">
    <input type="file" name="uploaded" />
    <input type="text" name="uploaded_name" />
    <input type="submit" name="insert" value="上传" />
</form>
</body>
</html>